package net.togogo.controller;

import net.togogo.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

@Controller
public class UserController {

    @RequestMapping("/freeusers")
    public String freeUsers(Model model){
        User user = new User(1,"李白","打野","王者峡谷");
        User user1 = new User(2,"蓝零亡","打野","王者峡谷");
        User user2 = new User(3,"路哪","打野","王者峡谷");
        List<User> users = new ArrayList<>();
        users.add(user);
        users.add(user1);
        users.add(user2);
        model.addAttribute("users",users);
        return "thyUser";
    }
}
